package com.wbp.cms.core.exception;

public enum ErrorType {

    ERR_VALIDATE(401, "参数验证失败"),

    ERR_BUSINESS(402, "业务异常"),

    ERR_REMOTE(500, "远程服务调用失败"),

    ERR_SYSTEM(501, "系统错误"),

    ERR_UNKNOW(600, "未知错误");

    /**
     * 错误码.
     */
    private int code;

    /**
     * 错误信息.
     */
    private String message;

    /**
     * Instantiates a new settle status.
     *
     * @param code    the code
     * @param message the message
     */
    private ErrorType(int code, String message) {
        this.code = code;
        this.message = message;
    }

    /**
     * 获取 the status.
     *
     * @return the status
     */
    public int getCode() {
        return code;
    }

    /**
     * 获取 the status name.
     *
     * @return the status name
     */
    public String getMessage() {
        return message;
    }


}
